<?

class Gallery_module extends Module
{
	public $version = '1.1';
    public $name = 'gallery';
	public function info()
	{
		return array(
			'name' => 'Gallery',
			'backend_uri' => 'gallery',
			'description' => 'A gallery',
			'frontend' => false,
			'backend'  => true,
			'menu'	  => 'design'
		);
	}
   
   public function routes()
   {
        return array(
                array(
                    'slug' => 'gallery_index',
                    'name' => 'Gallery index',
                    'url' => 'gallery'                   
                ),
                array(
                    'slug' => 'gallery_single',
                    'name' => 'Display single gallery',
                    'url' => 'gallery/view/{id}',
                    'items' => $this->db->from('mod_gallerys')->get()->result_array(), // Used for menu 
                )
                
            );    
   }
}